#ifndef	_WINDOW_READER_H_
#define _WINDOW_READER_H_

#include "types.h"

/*
 * This class represents reading a short A,C,G,T string while supporting
 * adding a new char.
 * Assumes that the window size is less than 32 and that we use a 64-bit system.
 */
class WindowReader
{
  private:
	ulong contents;
	const ulong mask;

  public:
	/*
	 * C'tor:
	 *	_window_size - the size the window will hold. -- this will be global
	 *	_contents - the initial contents of the window.
	 */
	WindowReader(ulong _contents);

	~WindowReader();

	/*
	 * inserts the new_char to the right position (and shifts the left most char).
	 */
	WindowReader& push(ulong new_char);

	inline ulong getContents() const;

#ifdef DEBUG
	void printStr() const;
#endif /* DEBUG */
};

inline ulong WindowReader::getContents() const
{
	return contents;
}


#endif /* _WINDOW_READER_H_ */
